#if !defined(__EPDADeserializer_h)
#define __EPDADeserializer_h

#include "tinyxml.h"
#include "EPDA.h"

class EPDADeserializer
{
public:
	EPDADeserializer();
	bool load(const char* pFilename);
	EPDA* getEPDA();
	~EPDADeserializer();

private:
	EPDA* pEPDA;
	Variable parseVariable(TiXmlElement* pNode);
	State parseState(TiXmlElement* pNode);
	Transition parseTransition(TiXmlElement* pNode);
	Method parseMethod(TiXmlElement* pNode);
	void parseCondition(TiXmlElement* pNode, Transition* tran);
	void parsePredicate(TiXmlElement* pNode, Condition* cond);
	void parseAction(TiXmlElement* pNode, Transition* tran);
};

#endif